#ifndef _PCCONFIG_DRV_H
#define _PCCONFIG_DRV_H

#include <rtthread.h>

typedef struct Config_Device_St ConfigDevice;

extern ConfigDevice configDevice;

enum FrameType
{
    END_FRAME = 0,
    UPGRADE,
    BASIC_CONFIG,
    SLAVE,
    GATEWAY_INFO,
    ADVANCED_CONFIG,
	RESTORE,
    LED_CONFIG,
	NORFLASH_MKFS = 0x18,
    ENDTYPE
};


struct Config_Device_St
{
    rt_mq_t rxMq;
    rt_mutex_t txMutex;
    void (*rx_indicate)(rt_uint8_t *, rt_size_t, enum FrameType);

    rt_err_t (*setRxIndicate)(void (*rx_ind)(rt_uint8_t *, rt_size_t, enum FrameType));
    rt_bool_t (*isRxIndicateEmpty)(void);
    rt_err_t (*send)(const rt_uint8_t *, rt_size_t, enum FrameType);
};

int configDeviceInit(void);
#endif
